import http from "@/utils/Http.ts"
import {SecretData} from "@/data/TaskData.ts";

export const addSecret = (data:SecretData) => {
    return http({
        url: '/secret/addSecret',
        method: 'post',
        data: data
    })
}

export const deleteSecret = (type:string, name:string) => {
    return http({
        url: '/secret/deleteSecret',
        method: 'delete',
        params: { type: type, name: name },
    })
}

export const getSecretList = (type:string | null) => {
    return http<Array<SecretData>>({
        url: '/secret/getSecretList',
        method: 'get',
        params: { type: type },
    })
}